package day10.Throw;

/**
 * @Auther:小陈的Java
 */
public class ThrowDemo {
    public static int sal(int sal) throws Exception{
        if(sal<0){
            Exception exception = new Exception();
            throw exception;
        }
        return sal;
    }

    public static void main(String[] args) {
        try {
            sal(-5);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {

        }
    }
}
